package com.maiji.cloud.response.login;

import java.util.Date;
import java.util.List;

import com.google.common.collect.Lists;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

@NoArgsConstructor
@Data
@Accessors(chain = true)
public class ArticleCommentListResData {

	@ApiModelProperty(value = "评论ID")
	private String uuId; // 评论ID

	@ApiModelProperty(value = "评论ID")
	private String commentId; // 评论ID

	@ApiModelProperty(value = "评论所属")
	private String belongId;

	@ApiModelProperty(value = "0:评论, 1:回复, 2:评论的评论")
	private Integer type; // 0:评论, 1:回复, 2:评论的评论

	@ApiModelProperty(value = "发评论的用户ID")
	private String sourceUserId;

	@ApiModelProperty(value = "被评论的用户ID")
	private String targetUserId;
	
	@ApiModelProperty("发布评论用户信息")
	private UserInfoResData sourceUser;

	@ApiModelProperty("被评论的用户信息")
	private UserInfoResData targetUser;
	
	@ApiModelProperty(value = "评论时间")
	private Date inTime; //评论时间
	
	@ApiModelProperty(value="评论内容")
	private String content;
	
	@ApiModelProperty(value = "评论的评论和评论回复总数")
	private Integer replySumCount = 0;

	@ApiModelProperty(value = "评论的评论和评论回复总数")
	private Boolean isMine = false;
	
	@ApiModelProperty(value="评论回复内容")
	private List<ArticleCommentListResData> list = Lists.newArrayList();

    public String getCommentId() {
        if (type == 0) return uuId;
        else return belongId;
    }

}
